package com.web.manager.pojo;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

@TableName("comment")  //表的名字
@Data
@NoArgsConstructor
@AllArgsConstructor
public class Comment {
    @TableId(type = IdType.AUTO)
    private Integer id;
    private String content;
    private Integer userId;
    private String time;
    private Integer pid;

    @TableField(exist = false)
    private String pUsername;

    @TableField(exist = false)
    private Integer pUserId;

    private Integer originId;
    private Integer articleId;

    @TableField(exist = false)
    private String username;

    @TableField(exist = false)
    private String img;

    @TableField(exist = false)
    private List<Comment> children;



}
